<template>
  <div id="app">
    <div>{{result}}</div>
    <h2>-----------------------------------</h2>
    <hello-world/>
    <h2>-----------------------------------</h2>
    <hello-axios/>
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld'
import HelloAxios from './components/HelloAxios'
import axios from 'axios'

export default {
  name: 'App',
  components:{
    HelloWorld,
    HelloAxios,
  },
  data(){
    return{
      result: '',
    }
  },
  // created生命周期函数（当组件被创建时调用）
  created(){
    axios({
      url:'http://123.207.32.32:8000/home/multidata',
    }).then(res=> {
      this.result = res;
    })
  },
}
</script>

<style>

</style>
